/*
 * @Author: 我想吃余 483766615@qq.com
 * @Date: 2025-10-31 23:05:44
 * @LastEditors: 我想吃余 483766615@qq.com
 * @LastEditTime: 2025-10-31 23:15:23
 * @FilePath: /oscode/signal/mykill/mykill.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * 
 */
#include <iostream>
#include <string>
#include <cstdlib>
#include <sys/types.h>
#include <signal.h>

using namespace std;

void Usage(string proc)
{
    cout << "Usage:\n\t" << proc << " signum pid\n\n";
}

int main(int argvc, char* argv[])
{
    if(argvc != 3)
    {
        Usage(argv[0]);
        return 1;
    }
    int signo = stoi(argv[1]);
    pid_t pid = stoi(argv[2]);
    kill(pid, signo); 

    return 0;
}